package com.ruoyi.module.expertTeam.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.expertTeam.mapper.ExpertTeamMapper;
import com.ruoyi.module.expertTeam.domain.ExpertTeam;
import com.ruoyi.module.expertTeam.service.IExpertTeamService;

/**
 * 专家团Service业务层处理
 * 
 * @author yqq
 * @date 2024-05-07
 */
@Service
public class ExpertTeamServiceImpl implements IExpertTeamService 
{
    @Autowired
    private ExpertTeamMapper expertTeamMapper;

    /**
     * 查询专家团
     * 
     * @param expertId 专家团主键
     * @return 专家团
     */
    @Override
    public ExpertTeam selectExpertTeamByExpertId(Long expertId)
    {
        return expertTeamMapper.selectExpertTeamByExpertId(expertId);
    }

    /**
     * 查询专家团列表
     * 
     * @param expertTeam 专家团
     * @return 专家团
     */
    @Override
    public List<ExpertTeam> selectExpertTeamList(ExpertTeam expertTeam)
    {
        return expertTeamMapper.selectExpertTeamList(expertTeam);
    }

    /**
     * 新增专家团
     * 
     * @param expertTeam 专家团
     * @return 结果
     */
    @Override
    public int insertExpertTeam(ExpertTeam expertTeam)
    {
        expertTeam.setCreateTime(DateUtils.getNowDate());
        return expertTeamMapper.insertExpertTeam(expertTeam);
    }

    /**
     * 修改专家团
     * 
     * @param expertTeam 专家团
     * @return 结果
     */
    @Override
    public int updateExpertTeam(ExpertTeam expertTeam)
    {
        expertTeam.setUpdateTime(DateUtils.getNowDate());
        return expertTeamMapper.updateExpertTeam(expertTeam);
    }

    /**
     * 批量删除专家团
     * 
     * @param expertIds 需要删除的专家团主键
     * @return 结果
     */
    @Override
    public int deleteExpertTeamByExpertIds(Long[] expertIds)
    {
        return expertTeamMapper.deleteExpertTeamByExpertIds(expertIds);
    }

    /**
     * 删除专家团信息
     * 
     * @param expertId 专家团主键
     * @return 结果
     */
    @Override
    public int deleteExpertTeamByExpertId(Long expertId)
    {
        return expertTeamMapper.deleteExpertTeamByExpertId(expertId);
    }
}
